&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"&gt;
&lt;mapper namespace="${pkgName?lower_case}.${proName?lower_case}.mapper.${tableName?cap_first}Mapper"&gt;
         &lt;sql id="baseSql"&gt;
               <#list columnInfos_origin as columnInfo><#if columnInfo_has_next>${columnInfo.columnName},<#else>${columnInfo.columnName}</#if></#list>
         &lt;/sql&gt;

&lt;/mapper&gt;